#include <stdio.h>
#include <stdlib.h>
#include <string.h>

int main(int argc, const char *argv[]){
        const char* input;
        char* output;
        const char *input_cursor;
        char *output_cursor;
        int len;
        if(argc!= 2){
                printf("Usage: ./a.out decode input-url-string\n");
                return 1;
        }
        
        input  = argv[1];
        len = strlen(input);
        output = (char*) malloc(len+1);
        if(output == NULL){
                printf("Memory allocation failed\n");
                return -1;
        }

        input_cursor = input;
        output_cursor = output;

        while(*input_cursor){
                *output_cursor++ = *input_cursor++;
        }

        printf("Input URL: %s\n", output);
        return 0;
}